home *** CD-ROM | disk | FTP | other *** search
/ ETO Development Tools 1 / ETO Development Tools 1.iso / Essentials / MacApp Documentation / MacApp AppleLink Messages / MacApp.Tech$ Oct 89 / Z0176-GetSuperClassTable -Oct89 < prev    next >
Encoding:
Text File  |  1989-10-25  |  2.2 KB  |  87 lines  |  [TEXT/GEOL]

  1. Item    9901434                         25-Oct-89        13:50
  2.  
  3. From:   MADA.EUROPE                     MacApp Dev Assoc Europe, E Carrasco
  4.  
  5. To:     X0121                           Symantec,Languages Tech Support,VCA
  6.         D0152                           Symantec Mktg, Languages,PRT
  7.  
  8. cc:     MACAPP.TECH$                    MACAPP Tech
  9.  
  10. Sub:    GetSuperClassTable with THINK
  11.  
  12. Attn:  MacApp.Tech and Symantec
  13.  
  14. From:  Eric Carrasco
  15.        MADA Europe
  16.        2, allée des Acacias
  17.        F-95130 Le Plessis Bouchard
  18.        France
  19.  
  20. Sub:   GetSuperClassTableHandle with THINK Pascal
  21.  
  22.  
  23. Hi all OOP'ers,
  24.  
  25. Many European developers enjoy Think Pascal and would like MADA to provide a
  26. THINK version of MacApp 2.0B9 and next versions. This has been done without
  27. difficulty BUT we have one last problem:
  28.   the procedure %_CLASSINFO is generated by MPW Linker so we get the standard
  29. message from Think Pascal Linker:
  30.           undefined: "%_CLASSINFO" (UObject.p)
  31.  
  32.  
  33. Let's have a look at MacApp source code (file UObject.Globals.p):
  34.  
  35. ---
  36.    PROCEDURE %_CLASSINFO;
  37.    EXTERNAL;
  38.   { Created by linker }   Aaaaaaaarrrrrrrgl!!!
  39. ---
  40.  
  41.  
  42.   This procedure is used in GetSuperClassTableHandle function:
  43.  
  44. ---
  45.  FUNCTION GetSuperClassTableHandle: Handle;
  46.  
  47.  BEGIN
  48.   { Force Jump Table relative }
  49.   GetSuperClassTableHandle := Handle(ord(@%_CLASSINFO) + 2);
  50.   { skip jmp instruction to make PHONY handle }
  51.  END;
  52. ---
  53.  
  54.  
  55.   And finally, a global pSuperClassTable variable is setup.
  56.  
  57. ---
  58. PROCEDURE InitUObject;
  59.  
  60.   BEGIN
  61.   ...
  62.   pSuperClassTable := GetSuperClassTableHandle;
  63.   ...
  64.   END;
  65. ---
  66.  
  67.   pSuperClassTable is used in global procedures (GetClassSizeFromId,
  68. GetClassNameFromID, GetSuperClassID, OrderClassIdsByName, NewObjectByClassId,
  69. OrderClassIdsByName, etc...)
  70. All those procedures are base on method dispatch table. We find them everywhere
  71. in MacApp source code and can't do anything without them.
  72.  
  73.  
  74. My questions are:
  75.   1. Is there any similar method in Think Pascal, I mean a method equivalent to
  76. %_CLASSINFO or to GetSuperClassTableHandle?
  77.  
  78.  2. Is there any way to know how objects are implemented in THINK Pascal?
  79.  
  80.  
  81. Any help will be welcome, we keep on working on this problem.
  82.  
  83. Best Regards,
  84.  
  85. Eric
  86.  
  87.